package com.itheima.mapper;

import com.itheima.pojo.OperateLog;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface LogMapper {
    /**
     * 分页查询所有的操作日志
     * */
    @Select("select o.*,e.name as operateEmpName " +
            "from operate_log o left join emp e " +
            "on o.operate_emp_id = e.id order by operate_time desc")
    List<OperateLog> queryAllLogs();
}
